﻿using System;

namespace DDDSample.Domain.Cargo
{
    public class Leg
    {
        private readonly DateTime _loadDate;
        private readonly DateTime _unloadDate;
        private readonly Location.Location _loadLocation;
        private readonly Location.Location _unloadLocation;

        protected Leg()
        {
            
        }

        public Leg(Location.Location loadLocation, DateTime loadDate, Location.Location unloadLocation, DateTime unloadDate)
        {
            _loadLocation = loadLocation;
            _unloadDate = unloadDate;
            _unloadLocation = unloadLocation;
            _loadDate = loadDate;
        }

        public DateTime LoadDate
        {
            get { return _loadDate; }
        }

        public DateTime UnloadDate
        {
            get { return _unloadDate; }
        }

        public Location.Location LoadLocation
        {
            get { return _loadLocation; }
        }

        public Location.Location UnloadLocation
        {
            get { return _unloadLocation; }
        }
    }
}